/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



package atm;

import java.awt.event.ActionEvent;
import javax.swing.JButton;


/**
 *
 * @author Jose Gabriel
 */
public class Boton extends JButton{
    /**
     * True para un boton de accion, false para un boton de valor
     */
    Boolean action;
    
    public Boton() {
        action=false;
    }    

    public String getValue(){
        return this.getText();
    }

    public void setAction(Boolean action) {
        this.action = action;
    }
    
    public void iniciar(){
        this.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                evento(evt);
            }
        });
    }
    
    public void evento(ActionEvent event){
        System.out.println("Estás ejecutando el metodo 'evento' por defecto");
    }
}
